<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/19
 * Time: 14:24
 */

namespace osc\api\model;


use think\Model;

class ContractIncrease extends Model
{
    /**
     * 统计收益
     * @param $username
     * @return float|int
     */
    public function sum_inc($username){
        $inc = $this->where('username',$username)->sum('inc');
        $ice = $this->where('username',$username)->sum('ice');
        return $ice+$inc;
    }
}